This invention relates to a method and apparatus for a replicator for an on-line hot-standby database.
In a hot-standby (HSB) database, a transaction is committed in two phases whereby both a primary node and a backup node must acknowledge changes successfully before the transaction is considered as properly committed. This is a two-phase commit (2PC) protocol that ensures a database in both nodes has always the same state. 2PC is an atomic commitment protocol (ACP) and a specialized type of consensus protocol for coordinating all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) a transaction. Some HSB databases provide an option for the user to trade consistency for performance by providing more relaxed transactions. Such a transaction is defined in a two-safe received (2SR) protocol in which primary node commits as soon as a backup node acknowledges that it has received all log records of the committing transaction.
A primary node is sometimes known as a master node, and a backup node is sometimes known as a secondary node, standby node or slave node. Typically, a primary node accepts all transactions, while a backup node only accepts read-only transactions.